<?php
/**
 * @msg 主要获取首页视频文字链
 * @file videocontroller.php
 * @author LinLin
 * @date 2016年5月30日 下午6:44:51
 * @brief 
 */
namespace haibao\cms\business\control\pc\index;

class VideoController extends IndexController{

    public function __construct($updateTime = null,$controlId,$isPublish){
        parent::__construct($updateTime,$controlId,$isPublish);
    }
    
    /**
     * 显示模版内容（模版动态数据的绑定和模版输出）
     * @param : String $content
     * @param : Array $controlData;
     */
    public function displayTemplateHtml(){
    
        $controlData = $this->getParameter(self::$CONTROL_DATA);
        $content = $this->getParameter(self::$CONTROL_CONTENT);
        $path = $this->generateHtmlPath(__CLASS__);
       

        $this->assign('channelUrl', \haibao\classlibrary\cms\Config::getConfig(\haibao\classlibrary\cms\Config::CLASSLIBRARY_CONFIG_HOST_EXCLUSIVE).'/videoflow/0/');
        $isNewHtml = $this->generateHtml($path,$content);
        $this->assign('wordLinkList',$this->getWordLinkList($controlData['auto'],\haibao\classlibrary\cms\Config::getConfig(\haibao\classlibrary\cms\Config::CLASSLIBRARY_CONFIG_HOST_EXCLUSIVE).'/videoflow/0/'));
        $content = $this->getHtml($path);
        // 解析内容 更换链接
        $content = $this->replaceCDNLink($content);
        return $content;
    }
} 